<?php 

include "scripts/connectDB.php";

$result = mysql_query("SELECT * FROM cwer,clan,map WHERE cwer.map_id = map.map_id AND cwer.clan_id = clan.clan_id ORDER BY cw_id DESC");

echo "<table border='0' frame='void' cellpadding='0' cellspacing='2' class='cwer'>
<tr>
<th>#</th>
<th>Date added</th>
<th>Vs</th>
<th>Map</th>
<th>Score</th>
<th>Result</th>
</tr>";

while($row = mysql_fetch_array($result))
  {
  echo "<tr>";
  echo "<td width='10px'>" . "<center>" . $row['cw_id'] . "</center>" . "</td>";
  echo "<td width='140px'>" . "<center>" . $row['date'] . "</center>" . "</td>";
  echo "<td width='50px'>" . "<center>" . $row['clan'] . "</center>" . "</td>";
  echo "<td width='100px'>" . "<center>" . $row['map'] . "</center>" . "</td>";
  echo "<td>" . $row['score'] . "</td>";
  echo "<td width='20px'>" . "<center>" . "<span class='win'>" . $row['win'] . "</span>";
  echo "<span class='loss'>" . $row['loss'] . "</span>";
  echo "<span class='tie'>" . $row['tie'] . "</span>" . "</center>" . "</td>";
  echo "</tr>";
  }
echo "</table>";

mysql_close($con);
?>

